package com.keshan.service.impl;

import com.keshan.mapper.SaveOurShipMapper;
import com.keshan.pojo.SaveOurShip;
import com.keshan.pojo.SaveOurShipExample;
import com.keshan.service.SaveOurShipServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author keshan
 * @date 2022/10/21 - 19:34
 */
@Service
public class SaveOurShipServicesImpl implements SaveOurShipServices {
    @Autowired
    SaveOurShipMapper saveOurShipMapper;
    @Override
    public int insertBySelectiveSaveOurShip(SaveOurShip saveOurShip) {
        return saveOurShipMapper.insert(saveOurShip);
    }

    @Override
    public List<SaveOurShip> getSaveOurShipListByImei(String imei) {
        SaveOurShipExample saveOurShipExample = new SaveOurShipExample();
        SaveOurShipExample.Criteria criteria = saveOurShipExample.createCriteria();
        criteria.andImeiEqualTo(imei);
        return saveOurShipMapper.selectByExample(saveOurShipExample);
    }
}
